import request from '../request'

const Api = {
  parentList: '/api/admindisciplineCategory/disciplineCategory/parentList',
  page: '/api/admindisciplineCategory/disciplineCategory/list',
  update: '/api/admindisciplineCategory/disciplineCategory/update',
  remove: '/api/admindisciplineCategory/disciplineCategory/remove',
  removeAll: '/api/admindisciplineCategory/disciplineCategory/removeBatch',
  save: '/api/admindisciplineCategory/disciplineCategory/save',
  details: '/api/admindisciplineCategory/disciplineCategory/selectById',
  subjectPage: '/api/admindisciplineCategory/disciplineCategory/parentList',
}

export const remove = params => {
  return request.request({
    url: Api.remove,
    params,
    method: 'DELETE'
  })
}
export const removeAll = params => {
  return request.request({
    url: Api.removeAll,
    params,
    method: 'DELETE'
  })
}
// 课程代码的子级分页
export const page = params => {
  return request.request({
    url: Api.page,
    params,
    method: 'GET'
  })
}
// 课程代码的父级分页
export const parentList = params => {
  return request.request({
    url: Api.parentList,
    params,
    method: 'GET'
  })
}

/** 课程代码管理基本信息 */
export const save = data => {
  return request.request({
    url: Api.save,
    data,
    method: 'POST'
  })
}

/** 课程代码管理基本信息 */
export const update = data => {
  return request.request({
    url: Api.update,
    data,
    method: 'put'
  })
}

/** 课程代码管理基本信息 */
export const details = data => {
  return request.request({
    url: Api.details,
    data,
    method: 'GET'
  })
}
/** 学科信息列表 */
export const subjectPage = data => {
  return request.request({
    url: Api.subjectPage,
    data,
    method: 'GET'
  })
}
